Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve performance of blocks service by dependency injection #1483

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

filvecchiato
Copy link
Contributor

It slightly improves the performance of the blocks controller by injecting the historic api to calculate the fees removing two extra promises per extrinsic.

It improves the single block query by ~15% (tested on large blocks in different chains) and also improves the response time on range queries by ~10%. On large ranges > 200 blocks, the improvement reduces as I believe it becomes more of a memory issue.

We should probably have a discussion on what to do with the range query, since if extrinsics/block will increase, that specific query will become slower, even if performance is further improved.

@filvecchiato filvecchiato requested a review from a team as a code owner August 26, 2024 14:32
@filvecchiato filvecchiato changed the title fix: Improve performance of blocks controller by dep injection fix: Improve performance of blocks service by dependency injection Aug 26, 2024
Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice improvements

@filvecchiato filvecchiato merged commit 6eaca88 into master Aug 27, 2024
17 checks passed
@filvecchiato filvecchiato deleted the performance branch August 27, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants